package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBidroomReservationMapper;
import com.ruoyi.system.domain.SysBidroomReservation;
import com.ruoyi.system.service.ISysBidroomReservationService;

/**
 * 预约管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-03
 */
@Service
public class SysBidroomReservationServiceImpl implements ISysBidroomReservationService 
{
    @Autowired
    private SysBidroomReservationMapper sysBidroomReservationMapper;

    /**
     * 查询预约管理
     * 
     * @param id 预约管理主键
     * @return 预约管理
     */
    @Override
    public SysBidroomReservation selectSysBidroomReservationById(Long id)
    {
        return sysBidroomReservationMapper.selectSysBidroomReservationById(id);
    }

    /**
     * 查询预约管理列表
     * 
     * @param sysBidroomReservation 预约管理
     * @return 预约管理
     */
    @Override
    public List<SysBidroomReservation> selectSysBidroomReservationList(SysBidroomReservation sysBidroomReservation)
    {
        return sysBidroomReservationMapper.selectSysBidroomReservationList(sysBidroomReservation);
    }

    /**
     * 新增预约管理
     * 
     * @param sysBidroomReservation 预约管理
     * @return 结果
     */
    @Override
    public int insertSysBidroomReservation(SysBidroomReservation sysBidroomReservation)
    {
        sysBidroomReservation.setCreateTime(DateUtils.getNowDate());
        return sysBidroomReservationMapper.insertSysBidroomReservation(sysBidroomReservation);
    }

    /**
     * 修改预约管理
     * 
     * @param sysBidroomReservation 预约管理
     * @return 结果
     */
    @Override
    public int updateSysBidroomReservation(SysBidroomReservation sysBidroomReservation)
    {
        sysBidroomReservation.setUpdateTime(DateUtils.getNowDate());
        return sysBidroomReservationMapper.updateSysBidroomReservation(sysBidroomReservation);
    }

    /**
     * 批量删除预约管理
     * 
     * @param ids 需要删除的预约管理主键
     * @return 结果
     */
    @Override
    public int deleteSysBidroomReservationByIds(Long[] ids)
    {
        return sysBidroomReservationMapper.deleteSysBidroomReservationByIds(ids);
    }

    /**
     * 删除预约管理信息
     * 
     * @param id 预约管理主键
     * @return 结果
     */
    @Override
    public int deleteSysBidroomReservationById(Long id)
    {
        return sysBidroomReservationMapper.deleteSysBidroomReservationById(id);
    }
}
